package cn.how2go.common.vo;

import java.io.Serializable;

/**
 * Created by Administrator on 2019/7/15.
 */
public class Location implements Serializable {
    /**
     * 纬度,以度为单位的纬度值乘以10的6次方，精确到百万分之一度
     */
    private double latitude;
    /**
     * 经度,以度为单位的经度值乘以10的6次方，精确到百万 分之一度
     */
    private double longitude;
    /**
     * 海拔高度，单位为米（m）
     */
    private short altitude;
    /**
     * 速度,1/10km/h
     */
    private double speed;
    /**
     * 方向,0～359，正北为0，顺时针
     */
    private short course;

    public Location(int latitude, int longitude, short altitude, short speed, short course) {
        this.latitude = latitude*Math.pow(10,-6);
        this.longitude = longitude*Math.pow(10,-6);
        this.altitude = altitude;
        this.speed = speed*Math.pow(10,-1);
        this.course = course;
    }

    /**
     * 时间,yyyy-MM-dd HH:mm:ss（GMT+8时间，本标准中之后涉及的时间均采用此时区）
     */


    public short getAltitude() {
        return altitude;
    }

    public void setAltitude(short altitude) {
        this.altitude = altitude;
    }


    public short getCourse() {
        return course;
    }

    public void setCourse(short course) {
        this.course = course;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }

    @Override
    public String toString() {
        return "位置{" +
                "纬度=" + latitude +
                ", 经度=" + longitude +
                ", 海拔高度=" + altitude +
                ", 速度=" + speed +
                ", 方向=" + course +
                '}';
    }
}
